<?php
/*
	插件概览
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'welcome';
$plugin_name = $_RQ['basicname'] ? $_RQ['basicname'] : '';
$_RQ['op']=$_RQ['op']?$_RQ['op']:'welcome';
$tabs=array(
	array('op'=>'welcome','title'=>'概况'),
	
);
set_html('tabs',$tabs);
if($_RQ['op']=='welcome'){
	//系统运行参数
	/*$item=array();
	$item['level']=$this->level_types[$this->setting['level']];
	$item['commission']="顾客在商城下单并付款后开始给上线计算佣金，按照订单实际支付金额【{$this->commission_types[$this->setting['commissiontype']]}】乘以相应分销商佣金比例得到佣金数额。";
	$item['balance']="佣金所属订单完成后【{$this->setting['balance_day']}】天成为可结算状态，可结算佣金达【{$this->setting['balance_money']}元】可申请结算，审核通过的结算单由管理员进行打款操作，打款手续费为待打款佣金的【{$this->setting['balance_per']}%】。";
	$return['item']=$item;
	$return['htmls'][]=array(
		'type'=>'look',
		'desc'=>'系统基础运行参数',
		'look'=>array(
			array('type'=>'string','name'=>'level','title'=>'分销层级'),
			array('type'=>'string','name'=>'commission','title'=>'佣金规则'),
			array('type'=>'string','name'=>'balance','title'=>'结算规则'),
		),
	);*/
	//会员
	$member=array(
		'member'=>$this->count('list',array('uniacid'=>$_SESSION['uniacid'],'status'=>1)),
		
	$return['htmls'][]=array('type'=>'data','one_num'=>3,'title'=>'邀请卡概况','datas'=>array(
		array('title'=>'邀请卡数量','num'=>1,'data'=>$member['member']),
		
	))
	);
	//佣金
	$month_start=strtotime(date('Ym').'01');
	
	$scan['num']=$this->sum('list',array('uniacid'=>$_SESSION['uniacid'],'createtime >'=>$month_start),'scan');
	
	

	$return['htmls'][]=array('type'=>'data','one_num'=>1,'title'=>'扫描概况','datas'=>array(
		array('title'=>'扫描次数','num'=>1,'data'=>$scan['num']),
		
	));
	
	
	
	set_html('title','邀请卡概况');
	exi($return);
}